#ifndef SEARCHITEM_H
#define SEARCHITEM_H

#include "./include/item.h"

class QLabel;

class SearchItem : public Item
{
public:
    SearchItem(QWidget *parent = 0);

    bool isClicked;
    inline void SetPos(const QString &position)
    {
        pos->setText(position);
    }

    inline void SetIcon(const QString &filePath)
    {
        icon->setText(filePath);
    }

private slots:
    void SwitchToObject();

private:
    void CreateWidget();
    void CreateLayout();
    void mouseDoubleClickEvent(QMouseEvent *);


    QLabel *pos;
    QLabel *icon;
};

#endif // SEARCHITEM_H
